package com.alliky.home.ui.adapter

import android.widget.ImageView
import coil.load
import com.alliky.home.R
import com.rrc.common.entity.CategoryVO
import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.BaseViewHolder

/**
 * ================================================
 * @Description: 描述
 * @Author: wxianing
 * @Date: 2022/11/23 18:18
 * ================================================
 */
class CategoryAdapter (data: MutableList<CategoryVO>?) :
    BaseQuickAdapter<CategoryVO, BaseViewHolder>(R.layout.item_home_category_layout, data) {
    override fun convert(helper: BaseViewHolder, item: CategoryVO?) {
        helper.setText(R.id.tv_name, item?.cate_name)
        helper.getView<ImageView>(R.id.iv_image).load(item?.thumb2)
    }
}